package com.example.manage_dzensaas.mapper.db2;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.manage_dzensaas.pojo.entity.db2.IdempotentQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
* @author Administrator
* @description 针对表【idempotent_query(MQ幂等查询表)】的数据库操作Mapper
* @createDate 2025-07-08 13:29:51
* @Entity generator.domain.IdempotentQuery
*/
@Mapper
public interface IdempotentQueryMapper extends BaseMapper<IdempotentQuery> {

    /**
     * 查询MQ幂等请求
     *
     * @param requestId 请求id
     * @param businessType 业务类型
     * @return 状态码
     */
    Integer selectByStatus(@Param("requestId") String requestId , @Param("businessType") int businessType);

    /**
     * 插入MQ幂等请求
     *
     * @param requestId 幂等请求id
     * @param businessType 业务类型
     * @param status 状态码
     * @param responseResult 响应结果
     * @return 影响行数
     */
    Integer insertByReq(@Param("requestId") String requestId, @Param("businessType") int businessType, @Param("status") int status, @Param("responseResult") String responseResult);

}




